feat: release_service_utils as python package#790
Conversation
95b46aa to
7877f1d
Compare
Review Summary by QodoConvert scripts/python to importable release_service_utils package
WalkthroughsDescription• Convert scripts/python into importable release_service_utils package • Update imports across helpers and tasks to use package namespace • Add setuptools configuration for package distribution • Reorganize task structure with internal module hierarchy Diagramflowchart LR
A["scripts/python"] -->|"becomes package"| B["release_service_utils"]
B -->|"contains"| C["helpers"]
B -->|"contains"| D["tasks"]
D -->|"contains"| E["internal"]
F["pyproject.toml"] -->|"configures"| B
G["Module imports"] -->|"updated to"| H["from release_service_utils.helpers import X"]
File Changes1. scripts/python/__init__.py
|
Code Review by Qodo
1. Missing check_fbc_opt_in module
|
There was a problem hiding this comment.
Pull request overview
This PR packages the existing scripts/python utilities as the importable release_service_utils Python package and adds tests around helper/task behavior.
Changes:
- Adds setuptools package configuration and package
__init__.pyfiles. - Updates selected helper imports toward package-qualified paths.
- Adds/updates tests for helpers and internal task modules.
Reviewed changes
Copilot reviewed 10 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Adds build-system and setuptools package mapping. |
uv.lock |
Updates editable project metadata and dependency lock entries. |
scripts/python/__init__.py |
Adds root package initializer. |
scripts/python/helpers/__init__.py |
Defines exported helper module names. |
scripts/python/helpers/authentication.py |
Switches retry import to package-qualified helper path. |
scripts/python/helpers/osidb.py |
Switches http_client import to package-qualified helper path. |
scripts/python/helpers/tests/test_authentication.py |
Adds authentication helper tests. |
scripts/python/helpers/tests/test_file.py |
Adds file helper tests. |
scripts/python/helpers/tests/test_http_client.py |
Adds HTTP client helper tests. |
scripts/python/helpers/tests/test_image_ref.py |
Adds image reference helper tests. |
scripts/python/helpers/tests/test_logger.py |
Adds logger helper tests. |
scripts/python/helpers/tests/test_osidb.py |
Updates mocks for packaged osidb dependency access. |
scripts/python/helpers/tests/test_retry.py |
Adds retry helper tests. |
scripts/python/helpers/tests/test_tekton.py |
Adds Tekton helper tests. |
scripts/python/helpers/tests/__init__.py |
Marks helper tests package. |
scripts/python/tasks/__init__.py |
Adds tasks package initializer. |
scripts/python/tasks/internal/__init__.py |
Adds internal tasks package initializer. |
scripts/python/tasks/internal/check_fbc_opt_in.py |
Removes the FBC opt-in task implementation. |
scripts/python/tasks/internal/tests/test_check_fbc_opt_in.py |
Updates FBC opt-in test import to package path. |
scripts/python/tasks/internal/tests/test_check_embargoed_cves.py |
Adds embargoed CVE task tests. |
scripts/python/tasks/internal/tests/__init__.py |
Marks internal task tests package. |
Comments suppressed due to low confidence (1)
scripts/python/tasks/internal/tests/test_check_fbc_opt_in.py:15
- This import points to
release_service_utils.tasks.internal.check_fbc_opt_in, but the PR deletesscripts/python/tasks/internal/check_fbc_opt_in.pyand there is no replacement module under the package. As a result, this test module (and any package consumer importing the FBC opt-in task) fails withModuleNotFoundError; keep/move the implementation intorelease_service_utils.tasks.internalor update the test and packaging to the actual new module location.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7877f1d to
00c0b32
Compare
8826eb6 to
f3c9706
Compare
6afb866 to
3cb759d
Compare
3cb759d to
6e92fbb
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #790 +/- ##
=======================================
Coverage 93.45% 93.45%
=======================================
Files 32 33 +1
Lines 2414 2415 +1
=======================================
+ Hits 2256 2257 +1
Misses 158 158
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/ok-to-test |
7aba83b to
52d627c
Compare
|
/ok-to-test |
scripts/python/* is now shipped as python package which can be imported as release_service_utils Assisted-By: claude Signed-off-by: Jindrich Luza <jluza@redhat.com>
52d627c to
553f988
Compare
|
/ok-to-test |
scripts/python/* is now shipped as python
package which can be imported as release_service_utils